import java.io.*;
import java.util.*;

public class FileAccess 
{
	public static void main(String[] args) throws IOException
	{
		FileReader fin;
		FileWriter fout;
		
		fin = new FileReader("C:\\Users\\jsundaram\\workspace\\BSJavaTraining\\src\\input.txt");
		fout = new FileWriter("C:\\Users\\jsundaram\\workspace\\BSJavaTraining\\src\\output.txt");
		
		Scanner s = new Scanner(fin);
		int size = 0;
		String line[] = new String[10];
			
		while(s.hasNextLine())
		{
			line[size++]=s.nextLine();
			//System.out.println(line[size-1]);
		}
			
		for(int i=size-1;i>=0;i--)
		{
			fout.write(line[i]+"\n");
			//System.out.println(line[i]);
		}
		fout.close();
		s.close();
	}
}
